declare var wx: any;
import { _decorator } from 'cc';
import * as fgui from "fairygui-cc";
import AbstractUIWindow from '../../window/AbstractUIWindow';
import UICore from '../../../../Core/Res/UICore';
import SceneManager from '../SceneManager';
import GameScenes from '../GameScenes';
import TimerMgr from '../../../../Core/Timer/TimerMgr';
import SpineLoader from '../../../../Core/Res/SpineLoader';
export class WxStartView extends AbstractUIWindow {
    private progress: fgui.GProgressBar;
    private loader3d: fgui.GLoader3D;
    protected getResList(): Array<string> {
        return ["Start"];
    }
    protected onInit(): void {
        this._view = UICore.createObject("Start", "WxStartView").asCom;
    }
    protected onShow(): void {
        this.progress.max = 100;
        this.progress.value = 0;
        this.progress.tweenValue(90, 1).onComplete(() => {
            fgui.UIPackage.loadPackage("UI/Main", (error, pkg: fgui.UIPackage) => {
                TimerMgr.ins.add(500, 1, () => {
                    this.progress.tweenValue(100, 0.5).onComplete(() => {
                        TimerMgr.ins.add(500, 1, () => {
                            SceneManager.ins.enterScene(GameScenes.main);
                        }, this);
                    }, this);
                }, this)
            });

        });
    }
}


